<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta name="author" content="wangyuguo">
		<title>在线操作员</title>
		<script language="javascript" type="text/javascript" src="../script/common.js"></script>
	
		<script type="text/javascript">
			//全局变量
			var qt;
			function load() {
				Eui.showNavigation();
				searchForm.orgName.value = Common.cOrg().name;
				searchForm.organization.value = Common.cOrg().id;
				createTable();
			}
			//创建数据表格
			function createTable(){
				var columns = []
				columns[2] = {defOrder:true}
				columns[5] = {title:"操作",width:"20",render:operFunc,align:"center",order:false}	
				qt = new QueryTable("online","searchForm","datalist",columns);
			}
			
			function operFunc(v, r) {
				return "<a href=# onclick=\"logout('" + r[5] + "','" + r[1] + "');return false;\">注销</a>";
			}
	
			//注销操作员
			function logout(sessionId, name) {
				if (showQuestion("是否注销操作员" + (name ? "【" + name + "】" : "") + "？")){
					DWR.call("partyService.invalidateSession", sessionId, function(v) {
						showInformation("操作员 " + v.name + " 注销成功");
						qt.showTable();
					})
				}
			}
	
			//选择单位控件
			function setOrg(sorg) {
				searchForm.organization.value = sorg.id;
				searchForm.orgName.value = sorg.name;
			}
		</script>
	</head>
	<body onload="load()">
		<!--页面导航-->
		<div class="nav">
			<div id="nav">&nbsp;</div>
		</div>
	
		<!--查询&列表-->
		<div id="listview">
			<!--查询form-->
			<div class="searchForm">
				<form id="searchForm" name="searchForm">
					<input type="hidden" name="organization">
					<table cellSpacing="0" cellPadding="4" width="100%" border="0">
						<tr>
							<td><label>姓 名</label>
								<input type="text" name="name" maxlength="20">
							</td>
							<td>
								<label>帐　　号</label>
								<input type="text" name="loginName" maxlength="20">
							</td>
							<td>
								<label>所属机构</label>
								<input type="text" name="orgName" readonly class="readonly" maxlength="20"><a class="orga" href="#" onclick="SystemMgnt.selOrg(setOrg)">&nbsp;&nbsp;</a>
							</td>
							<td><button type="button" onclick="qt.showTable()">查 询</button></td>
						</tr>
					</table>
				</form>
			</div>
			<div id="datalist"></div>
		</div>
	</body>
</html>